CREATE TABLE [dbo].[TTAUXI]
(
[TI_AUXI_EMPR] [dbo].[TD_VC_001] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NO_TIPO_AUXI] [dbo].[TD_VC_050] NOT NULL,
[NV_INFO_AUXI] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTAUXI__NV_INFO___15DA3E5D] DEFAULT ((0)),
[NV_QUIE_AUXI] [dbo].[TD_VC_020] NOT NULL,
[ST_FILL] [dbo].[TD_VC_001_SINO] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTAUXI__CO_USUA___17C286CF] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTAUXI__FE_USUA___18B6AB08] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTAUXI__CO_USUA___19AACF41] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTAUXI__FE_USUA___1A9EF37A] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTAUXI] WITH NOCHECK ADD CONSTRAINT [CK__TTAUXI__ST_FILL__16CE6296] CHECK NOT FOR REPLICATION (([ST_FILL]='N' OR [ST_FILL]='S'))
GO
ALTER TABLE [dbo].[TTAUXI] ADD CONSTRAINT [PK__TTAUXI__F6C8580D39788055] PRIMARY KEY CLUSTERED  ([TI_AUXI_EMPR], [CO_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTAUXI] ADD CONSTRAINT [FK__TTAUXI__CO_EMPR__4D4A6ED8] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMEMPR] ([CO_EMPR])
GO
GRANT SELECT ON  [dbo].[TTAUXI] TO [public]
GRANT INSERT ON  [dbo].[TTAUXI] TO [public]
GRANT DELETE ON  [dbo].[TTAUXI] TO [public]
GRANT UPDATE ON  [dbo].[TTAUXI] TO [public]
GO
